Ternary content addressable memory cell having single transistor pull-down stack

ABSTRACT

Ternary CAM cells are disclosed that include a compare circuit that includes a discharge path having a single pull-down transistor coupled between the match line and ground potential.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit under 35 USC 119(e) of the commonly owned U.S. Provisional Application No. 61/378,808 entitled “Fast Quaternary CAM Cell” filed on Aug. 31, 2010, which is incorporated herein by reference in its entirety, and is also a continuation-in-part of, and claims the benefit under 35 USC 120 of the co-pending and commonly owned U.S. patent application Ser. No. 13/015,543 entitled “Fast Quaternary CAM Cell” filed on Jan. 27, 2011, which is incorporated herein by reference in its entirety.

TECHNICAL FIELD

The present embodiments generally relate to content addressable memory (CAM) devices, and more particularly to quaternary and ternary CAM cells.

BACKGROUND

Content addressable memory (CAM) devices are frequently used in network switching and routing applications to determine forwarding destinations for data packets. A CAM device can be instructed to compare a selected portion of an incoming packet (e.g., a destination address extracted from the packet header) with CAM words (e.g., forwarding address) stored in an array within the CAM device. If there is a matching entry stored in the CAM array, the index of the matching CAM word can be used to access a corresponding location in an associated memory device to retrieve a destination address and/or other routing information for the packet.

A CAM device includes a CAM array having a plurality of CAM cells organized in a number of rows and columns. Each row of CAM cells, which can be used to store a CAM word, is coupled to a corresponding match line that indicates match results for the row. Each column of CAM cells is typically coupled to one or more data lines or data line pairs that can be used to drive data into a selected CAM row during write operations and/or for providing a search key to the CAM rows during compare operations. During a compare operation, the search key (e.g., the comparand word) is provided to the CAM array and compared with the CAM words stored therein. For each CAM word that matches the search key, a corresponding match line is asserted to indicate the match result. If any of the match lines are asserted, a match flag is asserted to indicate the match condition, and a priority encoder determines the match address or index of the highest priority matching entry in the CAM array.

CAM arrays typically include either binary CAM cells that store binary data values (i.e., a logic “1” or a logic “0” value) or ternary CAM cells that store ternary data values (i.e., a logic “1” value, a logic “0” values, or a don't care value). Ternary CAM cells store a data bit and a mask bit. For example, when a mask bit within a ternary CAM cell is inactive (e.g., set to a logic 1 value), the ternary CAM cell operates as a conventional binary CAM cell storing an “unmasked” data bit. When the mask bit is active (e.g., set to a logic 0 value), the ternary CAM cell is treated as storing a “don't care” value, which means that all compare operations performed on the actively masked ternary CAM cell will result in a cell match condition.

FIG. 1A shows a well-known quaternary CAM cell 100 of the type described in U.S. Pat. No. 5,319,590 issued to Montoye, the disclosure of which is incorporated herein by reference. Quaternary CAM cells, which are also referred to as XY CAM cells, include two storage cells 120 and 122 coupled to a compare circuit 130. The two data bits X and Y can collectively represent four possible states: “0”, “1”, “don't care”, and a fourth state which may be left unused or may indicate “invalid,” as depicted in FIG. 1B. The logic “0” and “1” states correspond to the logic states represented, for example, by a conventional binary CAM cell. For each of these states, if the comparand data (e.g., provided to CAM cell 100 via complementary comparand lines CL and CLB) matches the data stored in CAM cell 100, compare circuit 130 does not discharge the match line ML, which indicates a match condition. Conversely, if the comparand data does not match the data stored in CAM cell 100, compare circuit 130 discharges ML (e.g., toward ground potential) to indicate the mismatch condition. For the “don't care” state, the logic low values for X and Y maintain respective transistors 132 and 134 in non-conductive states, thereby preventing compare circuit 130 from discharging ML. In this manner, data stored in CAM cell 100 is masked from the compare operation, thereby forcing a match condition for CAM cell 100, regardless of the comparand data. For the “invalid” state, the logic high values for X and Y maintain respective transistors 132 and 134 in conductive states. During a compare operation, one of the complementary comparand data bit pair provided on CL/CLB will be logic high, thereby causing compare circuit 130 to discharge ML to indicate the mismatch state, regardless of the comparand data.

Note that the XY CAM cell 100 stores a data value as a complimentary bit pair, where the Y bit stores the binary data value and the X bit stores the complemented binary data value. This allows XY CAM cell 100 to perform faster compare operations than conventional ternary CAM cells.

However, to keep up with demand for ever-increasing search rates, it would be desirable to increase the speed of XY CAM cells.

BRIEF DESCRIPTION OF THE DRAWINGS

Present embodiments are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar elements and in which:

FIG. 1A is a circuit diagram of a conventional quaternary (XY) CAM cell;

FIG. 1B shows a truth table for conventional data storage of the XY CAM cell of FIG. 1A;

FIG. 2 is a block diagram of a CAM device within which the present embodiments may be implemented;

FIG. 3 is a block diagram of one embodiment of the CAM array of FIG. 2;

FIG. 4 is a block diagram of an XY CAM cell according to some embodiments;

FIG. 5 is a block diagram of an XY CAM cell according to other embodiments;

FIG. 6A is a block diagram of a ternary content addressable memory (TCAM) cell;

FIG. 6B is a block diagram of another TCAM cell;

FIG. 6C is a block diagram of a TCAM cell that incorporates an XY encoding technique;

FIG. 6D shows a truth table for data storage of the TCAM cell of FIG. 6C;

FIG. 7 is a block diagram of a TCAM cell according to some embodiments.

FIG. 8 is a block diagram of a TCAM cell according to other embodiments;

FIG. 9A is a block diagram of a TCAM cell that incorporates an XY encoding technique in accordance with some embodiments; and

FIG. 9B shows a truth table for data storage and match conditions of the TCAM cell of FIG. 9A.

DETAILED DESCRIPTION

Fast quaternary (XY) and ternary CAM cells including compare circuits having a reduced stack are disclosed. These CAM cells can be used in a wide variety of CAM architectures and applications for which speed is important. In the following description, for purposes of explanation, specific nomenclature is set forth to provide a thorough understanding of the present embodiments. However, it will be apparent to one skilled in the art that these specific details may not be required to practice the present embodiments. In other instances, well-known circuits and devices are shown in block diagram form to avoid obscuring the present embodiments unnecessarily. Additionally, the interconnection between circuit elements or blocks may be shown as buses or as single signal lines. Each of the buses may alternatively be a single signal line, and each of the single signal lines may alternatively be a bus. Further, the logic levels assigned to various signals in the description below are arbitrary, and therefore may be modified (e.g., reversed polarity) as desired. Accordingly, the present embodiments are not to be construed as limited to specific examples described herein but rather include within their scope all embodiments defined by the appended claims.

More specifically, CAM cells architected in accordance with present embodiments include a compare circuit that has a fewer number of pull-down transistors coupled between the match line and ground potential than conventional CAM cells, which in turn increases the speed of compare operations performed by such CAM cells. More specifically, by reducing the size of the pull-down stack of the CAM cell's compare circuit, the capacitive load on the match line is reduced, which in turn allows the match line to be charged and discharged more quickly than CAM cells having larger compare stacks. In addition, reducing the number of pull-down transistors between the match line and ground potential also reduces the resistance of the compare stack, which increases search speeds. Further, the reduced match line capacitance resulting from the fewer number of pull-down transistors in the compare stack may also reduce power consumption.

FIG. 2 is a block diagram of a CAM device within which CAM cells of present embodiments may be implemented. CAM device 200 includes a CAM array 210, an address decoder 220, a comparand register 230, a read/write circuit 240, a priority encoder circuit 250, and match logic 260. CAM array 210 includes any number of rows of CAM cells (not shown for simplicity in FIG. 2), where each row of CAM cells can be configured to store a data word. Further, while CAM array 210 is shown in FIG. 2 as a single CAM array, it may include any number of CAM array blocks that can be independently searched.

One or more instructions and related control signals may be provided to CAM device 200 from an instruction decoder (not shown for simplicity) to control read, write, compare, and other operations for CAM device 200. Other well-known signals that can be provided to CAM device 200, such as enable signals, clock signals, and power connections, are not shown for simplicity. Further, although not shown in FIG. 2, each row of CAM cells in CAM array 210 may have one or more validity bits to indicate whether the corresponding row (or any segment thereof) of CAM cells stores valid data.

Each row of CAM cells (not shown in FIG. 2 for simplicity) in CAM array 210 is coupled to address decoder 220 via a corresponding word line WL, and to match latches 212, to priority encoder 250, and to well-known match logic 260 via a corresponding match line ML. For simplicity, the word lines and match lines are represented collectively in FIG. 2. Address decoder 220 is well-known, and includes circuitry to select corresponding rows in CAM array 210 for read, write, and/or other operations in response to an address received from an address bus ABUS using the word lines WL. For other embodiments, addresses may be provided to address decoder 220 from another suitable bus and/or circuitry.

The match lines ML provide match results for compare operations between comparand data (e.g., a search key) and data stored in CAM array 210. Priority encoder 250, which is well-known, uses the match results indicated on the match lines and latched in the match latches 212 to determine the matching entry that has the highest priority number associated with it and generates the index or address of this highest priority match (HPM). In addition, priority encoder 250 may use the validity bits from CAM array 210 to generate the next free address that is available in CAM array 210 for storing new data. Although not shown in FIG. 2, for some embodiments, priority encoder 250 may provide the next free address to the address decoder 220.

Match logic 260, which is well-known, uses the match results indicated on the match lines to generate a match flag (MF) indicative of a match condition in CAM array 210. If there is more than one matching entry in CAM array 210, match logic 260 may generate a multiple match flag MF to indicate a multiple match condition. In addition, match logic 260 may use the validity bits from CAM array 210 to assert a full flag when all of the rows of CAM cells in CAM array 210 are filled with valid entries.

Each column of CAM cells (not shown in FIG. 2 for simplicity) in CAM array 210 is coupled to comparand register 230 via one or more corresponding comparand lines CL, and is coupled to read/write circuit 240 via one or more corresponding bit lines BL. For simplicity, the comparand lines CL and bit lines BL are represented collectively in FIG. 2. Comparand register 230 is well-known, and is configured to provide a search key (e.g., a comparand word) received from a comparand bus CBUS to CAM array 210 during compare operations with data stored therein. For other embodiments, the search key can be provided to CAM array 210 via another bus and/or circuit. Read/write circuit 240 includes well-known write drivers to write data received from a data bus DBUS to CAM array 210 via the bit lines BL, and includes well-known sense amplifiers to read data from CAM array 210 onto DBUS. For other embodiments, read/write circuit 240 may be coupled to a bus other than DBUS. Further, although not shown in FIG. 2 for simplicity, CAM device 200 can include a well-known global mask circuit (e.g., coupled to the comparand register 230) that can selectively mask the bits of the search key provided to the CAM array 210.

FIG. 3 is a more detailed block diagram of the CAM array 210 of FIG. 2. CAM array 210 is shown to include a plurality of CAM cells 202 organized in any number of rows and columns. The CAM cells 202 can be any suitable type of CAM cell including, for example, binary CAM cells, ternary CAM cells, and/or quaternary CAM cells. As noted above, each row of CAM array 210 may also include one or more validity bits. Each row of CAM cells 202 is coupled to a match line ML and to a word line WL. Each word line WL is driven by address decoder 220 (see also FIG. 2) to select one or more rows of CAM cells 202 for writing or reading. Each match line ML is coupled to priority encoder 250 via a corresponding match latch 212, which together form the match latches 212 of FIG. 2. The match latches 212 are clocked by a match latch clock signal CLK_ML in a well-known manner. Each column of CAM cells 202 in CAM array 210 is coupled to read/write circuit 240 via a complementary bit line pair BL/BLB, and to comparand register 230 via a complementary comparand line pair CL/CLB.

Prior to compare operations, the match lines ML are pre-charged (e.g., to logic high), and each set of complementary comparand line pairs CL/CLB are driven to the same predetermined logic level (e.g., to logic high). Then, during compare operations, the comparand register 230 provides the search key (e.g., the comparand word) to the CAM cells 202 by driving each pair of complementary comparand lines CL/CLB to opposite logic states indicative of the corresponding bit of the search key. For example, to provide a logic low comparand bit (C) to a column of CAM cells, the corresponding comparand line CL is driven to a first logic state (e.g., logic low) and the corresponding complementary comparand line CLB is driven to a second logic state (e.g., logic high); conversely, to provide a logic high comparand bit C to the column of CAM cells, the corresponding comparand line CL is driven to the second logic state (e.g., logic high) and the corresponding complementary comparand line CLB is driven to the first logic state (e.g., logic low). Thereafter, if all the CAM cells 202 in a particular row match the corresponding bits of the search key, then the match line ML remains in its logic high state to indicate the match condition. Conversely, if one or more of the CAM cells 202 in the row do not match the corresponding bit of the search key, then mismatching CAM cells 202 discharge the match line ML (e.g., toward ground potential) to indicate the mismatch condition.

FIG. 4 shows a quaternary (XY) CAM cell 400 in accordance with the present embodiments. The XY CAM cell 400 includes two memory cells 410 x and 410 y coupled to a compare circuit 420. The memory cells 410 x and 410 y can be any suitable type of storage cell including, for example, an SRAM cell, a DRAM cell, an EEPROM cell, a flash memory cell, a latch, or a register. For some embodiments, memory cells 410 are formed using cross-coupled CMOS inverter circuits, as known in the art. The first memory cell 410 x stores a first data bit “X”, and the second memory cell 410 y stores a second data bit “Y”. Together, the two data bits X and Y can collectively represent a data value D having four possible states: “0”, “1”, “don't care”, and a fourth state which may be left unused or may indicate “invalid,” as depicted in the truth table 150 of FIG. 1B.

More specifically, the logic “0” and “1” states correspond to the logic states represented by a conventional binary CAM cell. For each of these states, if the comparand data (e.g., provided to CAM cell 400 via complementary comparand lines CL and CLB) matches the data stored in CAM cell 400, the compare circuit 420 does not discharge the match line ML, which remains in its charged state to indicate a match condition. Conversely, if the comparand data does not match the data stored in CAM cell 400, compare circuit 420 discharges ML (e.g., toward ground potential) to indicate the mismatch condition. For the “don't care” state, the logic low values for X and Y cause compare circuit 420 to remain in a non-conductive state, thereby preventing the match line from discharging. In this manner, the data value D stored in CAM cell 400 is masked from the compare operation, thereby forcing a match condition for CAM cell 400, regardless of the comparand data. For the “invalid” state, the logic high values for X and Y cause the compare circuit 420 to remain in a conductive state to discharge the match line to indicate a mismatch condition, irrespective of the comparand data. For some embodiments, the “invalid” state can be used to disable a row of CAM array 210 containing one or more XY CAM cells 400, for example, as described in commonly-owned U.S. Pat. No. 6,865,098, which is incorporated by reference herein in its entirety.

The compare circuit 420 includes two match line pull-down transistors 421 x and 421 y, two pass transistors 422 x and 422 y, and two gating transistors 423 x and 423 y. A first group of transistors 421 x, 422 x, and 423 x forms a first selective pull-down circuit 425 x that selectively discharges the match line ML in response to a comparison of the complemented comparand bit ( C) provided on CLB and the first data bit (X), and a second group of transistors 421 y, 422 y, and 423 y forms a second selective pull-down circuit 425 y that selectively discharges the match line ML in response to a comparison of the comparand bit (C) provided on CL and the second data bit (Y).

More specifically, for the first selective pull-down circuit 425 x, the NMOS match line pull-down transistor 421 x is coupled between the match line ML and ground potential, and has a gate tied to a first node (Nx) that, in turn, is selectively coupled to receive X from the first memory cell 410 x via the PMOS pass transistor 422 x. The NMOS gating transistor 423 x is coupled between the gate of match line pull-down transistor 421 x and ground potential. The common gates of transistors 422 x and 423 x are coupled to the complementary comparand line CLB, and receive the complemented comparand bit ( C) during compare operations. For the second selective pull-down circuit 425 y, the NMOS match line pull-down transistor 421 y is coupled between the match line ML and ground potential, and has a gate tied to a second node (Ny) that, in turn, is selectively coupled to receive Y from the second memory cell 410 y via the PMOS pass transistor 422 y. The NMOS gating transistor 423 y is coupled between the gate of match line pull-down transistor 421 y and ground potential. The common gates of transistors 422 y and 423 y are coupled to the comparand line CL, and receive the comparand bit (C) during compare operations.

For other embodiments, the first node Nx can be coupled to receive the complemented first data bit X, the second node Ny can be coupled to receive the complemented second data bit Y, the common gates of transistors 422 x and 423 x can receive the comparand bit C, and the common gates of transistors 422 y and 423 y can receive the complemented comparand bit C. For such embodiments, the don't care state is obtained when X=Y=1, and the invalid state is obtained when X=Y=0.

An exemplary compare operation between a comparand bit C and a data value D stored in the CAM cell 400 is now described. During a pre-charge phase of the compare operation, the match line ML is pre-charged to logic high (e.g., towards VDD) by a suitable pre-charge circuit (not shown for simplicity), and the comparand lines CL/CLB are both pre-charged to logic high (e.g., towards VDD). The logic high state of CLB turns on NMOS transistor 423 x and turns off PMOS transistor 422 x. The conductive state of transistor 423 x pulls the gate of match line pull-down transistor 421 x (e.g., at node Nx) low towards ground potential, thereby maintaining transistor 421 x in a non-conductive state to isolate the match line ML from ground potential. The non-conductive state of transistor 422 x isolates the first memory cell 410 x from node Nx, thereby preventing the value of X from being pulled low to ground potential by the conductive NMOS transistor 423 x. Similarly, the logic high state of CL turns on NMOS transistor 423 y and turns off PMOS transistor 422 y. The conductive state of transistor 423 y pulls the gate of match line pull-down transistor 421 y (e.g., at node Ny) low towards ground potential, thereby maintaining transistor 421 y in a non-conductive state to isolate the match line ML from ground potential. The non-conductive state of transistor 422 y isolates the second memory cell 410 y from node Ny, thereby preventing the value of Y from being pulled low to ground potential by the conductive NMOS transistor 423 y.

Then, during an evaluation phase of the compare operation, the comparand bit C is provided in a complementary manner to the XY CAM cell 400 via comparand lines CL and CLB. If a comparand line is driven to logic high, then the corresponding selective pull-down circuit 425 is disabled and does not discharge the match line ML. Conversely, if a comparand line is driven to logic low, then the corresponding selective pull-down circuit 425 is enabled and selectively discharges the match line ML in response to the corresponding data bit provided by the associated memory cell 410. If both CL and CLB are driven to logic high (e.g., to achieve a column-masking function), then both selective pull-down circuits 425 x and 425 y are disabled and together prevent the match line ML from discharging, thereby causing the CAM cell 400 to indicate a match condition on ML irrespective of the data value D.

For one example, if the comparand bit is logic high (e.g., C=1 and C=0), then CL is driven to logic high and CLB is driven to logic low. The logic high state of CL disables the second selective pull-down circuit 425 y (in the manner described above), and prevents the second data bit Y stored in second memory cell 410 y from affecting the compare operation. The logic low state of CLB enables the first selective pull-down circuit 425 x (in the manner described above), and allows the first data bit X stored in first memory cell 410 x to selectively discharge the match line ML. Thus, if the data bit stored in the cell 400 is logic high (e.g., D=1), as indicated by X=0 and Y=1, then the logic low value (X=0) output by first memory cell 410 x propagates through pass gate 422 x to node Nx. In response to X=0, NMOS pull-down transistor 421 x does not turn on, and therefore the match line ML remains in its charged state to indicate the match condition between C=1 and D=1. Conversely, if the data bit is logic low (e.g., D=0), as indicated by X=1 and Y=0, then the logic high value (X=1) output by first memory cell 410 x propagates through pass gate 422 x to node Nx. In response to X=1, NMOS pull-down transistor 421 x turns on and discharges the match line ML low toward ground potential to indicate the mismatch condition between C=1 and D=0.

The XY CAM cell 400 operates in a complementary manner for compare operations in which the comparand bit is logic low (e.g., C=0 and C=1), where CL is driven to logic low and CLB is driven to logic high. More specifically, the logic low state of CL enables selective pull-down circuit 425 y (in the manner described above), and allows the second data bit Y stored in second memory cell 410 y to selectively discharge the match line ML. The logic high state of CLB disables selective pull-down circuit 425 x (in the manner described above), and prevents the first data bit X stored in first memory cell 410 x from affecting the compare operation. Thus, if the data bit is logic low (e.g., D=0), as indicated by X=1 and Y=0, then the logic low value (Y=0) output by second memory cell 410 y propagates through pass gate 422 y to node Ny. In response to Y=0, NMOS pull-down transistor 421 y does not turn on, and therefore the match line ML remains in its charged state to indicate the match condition between C=0 and D=0. Conversely, if the data bit is logic high (e.g., D=1), as indicated by X=0 and Y=1, then the logic high value (Y=1) output by second memory cell 410 y propagates through pass gate 422 y to node Ny. In response to Y=1, NMOS pull-down transistor 421 y turns on and discharges the match line ML low toward ground potential to indicate the mismatch condition between C=0 and D=1.

In accordance with the present embodiments, the compare circuit 420 of XY CAM cell 400 includes only one transistor (e.g., transistor 421) in each pull-down path between the match line ML and ground potential, as shown in FIG. 4. In contrast, the conventional XY CAM cell 100 of FIG. 1A includes two series-connected transistors (e.g., transistors 131-132 and 133-134, respectively) in each pull-down path between the match line ML and ground potential. As a result, the XY CAM cell 400 of present embodiments is faster than the conventional XY CAM cell 100 of FIG. 1A. More specifically, because the compare circuit 420 employs single stack pull-down elements (e.g., transistor 421) between the match line and ground potential, the XY CAM cell 400 puts less pull-down resistance and less capacitive loading on the match line than the 2-stack pull-down elements (e.g., transistors 131-132 and 133-134, respectively) employed in the conventional XY CAM cell 100, and therefore is faster than conventional XY CAM cell 100. Further, because each CAM cell 400 puts less capacitive loading on the match line, a CAM array such as CAM array 210 of FIG. 2 can employ more CAM cells 400 in each row without degrading performance, as compared to conventional CAM cells 100. Further, the reduced match line capacitance resulting from fewer pull-down transistors in the compare stack of CAM cell 400 may reduce power consumption, as compared with conventional XY CAM cells 100 of FIG. 1A.

FIG. 5 shows an XY CAM cell 500 in accordance with other embodiments. The XY CAM cell 500 is modified to include a second compare circuit 520 that allows CAM cell 500 to perform two compare operations with the data value D stored therein at the same time, or alternatively in a sequential (e.g., staggered) manner. More specifically, the XY CAM cell 500 can simultaneously compare the data value D with a first comparand bit (C1) provided on a first pair of complementary comparand lines CL1/CL1B and with a second comparand bit (C2) provided on a second pair of complementary comparand lines CL2/CL2B, where the first pair of complementary comparand lines CL1/CL1B provide the first comparand bit C1 and its complement C1 to the first compare circuit 420, and the second pair of complementary comparand lines CL2/CL2B provide the second comparand bit C2 and its complement C2 to the second compare circuit 520. Match conditions between the data value D and the first comparand bit C1 are provided on a first match line ML1 by the first compare circuit 420, and match conditions between the data value D and the second comparand bit C2 are provided on a second match line ML2 by the second compare circuit 520.

The second compare circuit 520 includes two match line pull-down transistors 521 x and 521 y, two pass transistors 522 x and 522 y, and two gating transistors 523 x and 523 y. A first group of transistors 521 x, 522 x, and 523 x forms a first selective pull-down circuit 525 x that selectively discharges the second match line ML2 in response to a comparison with the complemented second comparand bit ( C2 ) and the first data bit (X), and a second group of transistors 521 y, 522 y, and 523 y forms a second selective pull-down circuit 525 y that selectively discharges the second match line ML2 in response to a comparison with the second comparand bit (C2) and the second data bit (Y).

More specifically, for the first selective pull-down circuit 525 x, the NMOS match line pull-down transistor 521 x is coupled between the second match line ML2 and ground potential, and has a gate tied to a third node (Mx) that, in turn, is selectively coupled to receive X from the first memory cell 410 x via the PMOS pass transistor 522 x. The NMOS gating transistor 523 x is coupled between the gate of match line pull-down transistor 521 x and ground potential. The common gates of transistors 522 x and 523 x are coupled to the second complementary comparand line CL2B, and receive the complemented second comparand bit ( C2 ) during compare operations. For the second selective pull-down circuit 525 y, the NMOS match line pull-down transistor 521 y is coupled between the second match line ML2 and ground potential, and has a gate tied to a fourth node (My) that, in turn, is selectively coupled to receive Y from the second memory cell 410 y via the PMOS pass transistor 522 y. The NMOS gating transistor 523 y is coupled between the gate of match line pull-down transistor 521 y and ground potential. The common gates of transistors 522 y and 523 y are coupled to the second comparand line CL2, and receive the second comparand bit (C2) during compare operations.

Compare operations for XY CAM cell 500 are performed in a manner similar to that described above with respect to CAM cell 400 of FIG. 4, except that XY CAM cell 500 can perform two compare operations at the same time (or alternately in a sequential or staggered manner). Thus, during the pre-charge phase of the compare operation, the first and second match lines ML1 and ML2 are both pre-charged to logic high (e.g., towards VDD) by suitable pre-charge circuits (not shown for simplicity), and both sets of complementary comparand lines CL1/CL1B and CL2/CL2B are pre-charged to logic high (e.g., towards VDD). In this manner, during the pre-charge phase, the first compare circuit 420 isolates the first match line ML1 from ground potential, and the second compare circuit 520 isolates the second match line ML2 from ground potential.

Then, during the evaluation phase of the compare operation, the first comparand bit C1 is provided to the XY CAM cell 500 in a complementary manner via comparand lines CL1 and CL1B, and the second comparand bit C2 is provided to the XY CAM cell 500 in a complementary manner via comparand lines CL2 and CL2B. If a comparand line is driven to logic high, then the corresponding selective pull-down circuit 425/525 is disabled and does not discharge its associated match line ML. Conversely, if a comparand line is driven to logic low, then the corresponding selective pull-down circuit 425/525 is enabled and selectively discharges its associated match line ML in response to the corresponding data bit provided by the associated memory cell 410. More specifically, if both CL1 and CL1B are driven to logic high (e.g., to achieve a column-masking function), then both selective pull-down circuits 425 x and 425 y are disabled and together prevent the first match line ML1 from discharging, thereby causing the CAM cell 500 to indicate a match condition on ML1 irrespective of the data value D. Similarly, if both CL2 and CL2B are driven to logic high (e.g., to achieve a column-masking function), then both selective pull-down circuits 525 x and 525 y are disabled and together prevent the second match line ML2 from discharging, thereby causing the CAM cell 500 to indicate a match condition on ML2 irrespective of the data value D.

Similar to the first compare circuit 420, the second compare circuit 520 of XY CAM cell 500 includes only one transistor (e.g., transistor 521) in each pull-down path between the second match line ML2 and ground potential, as shown in FIG. 5. In contrast, the conventional XY CAM cell 100 of FIG. 1A includes two series-connected transistors (e.g., transistors 131-132 and 133-134, respectively) in each pull-down path between the match line ML and ground potential. As a result, the XY CAM cell 500 of present embodiments is faster than the conventional XY CAM cell 100 of FIG. 1A. More specifically, because the compare circuit 520 employs single stack pull-down elements (e.g., transistor 521) between the second match line ML2 and ground potential, the compare circuit 520 puts less pull-down resistance and less capacitive loading on the match line than the 2-stack pull-down elements (e.g., transistors 131-132 and 133-134, respectively) employed in the conventional XY CAM cell 100, and therefore is faster and may even consume less power than conventional XY CAM cell 100. Further, because each CAM cell 500 puts less capacitive loading on each of the match lines ML1 and ML2, a CAM array such as CAM array of FIG. 2 can employ more CAM cells 500 in each row without degrading performance, as compared to conventional CAM cells 100.

FIG. 6A is a block diagram of a ternary content addressable memory (TCAM) cell 601 with a data cell 610, a mask cell 620, and a compare circuit 630. The compare circuit 630 includes pull-down transistor pairs 631A-631B and 632A-632B, and is configured to receive complementary (also known as “differential” or “balanced”) input signals. For example, the pull-down transistors 631A and 631B are controlled by complementary data signals D and D, respectively, provided by the data cell 610, and the pull-down transistors 632A and 632B are controlled by complementary comparand bits C and C, respectively. The symmetrical structure and operation of compare circuit 630 is advantageous because it provides balanced impedances and mutually cancelled noises. However, the discharge path between the match line ML and ground potential for the CAM cell 601 includes 3 series-connected pull-down transistors 631, 632, and 633, which in turn results in slower performance than TCAM cells that have fewer transistors in their compare stack.

FIG. 6B is a block diagram of another TCAM cell 602 having data cell 610, mask cell 620, and a compare circuit 640. The compare circuit 640 includes pass transistors 641A and 641B, and includes pull-down transistors 642 and 643. Transistor 641A is coupled between complementary comparand line CLB and a node N, and transistor 641B is coupled between the node N and comparand line CL. The gates of pass transistors 641A and 641B receive complementary data bits D and D, respectively, from the data cell 610. Pull-down transistors 642 and 643 are connected in series between match line ML and ground potential, with the gate of transistor 642 coupled to node N, and with the gate of transistor 643 coupled to receive a complemented mask bit from the mask cell 620.

The CAM cell 602 has fewer transistors than the CAM cell 601 of FIG. 6A, and the compare circuit 640 has only 2 transistors connected in series between the match line ML and ground potential. As a result, the capacitance on match line ML is also smaller as compared to the CAM cell 601. However, there are several drawbacks of CAM cell 602. First, the current and time associated with driving the complementary comparand lines CL and CLB may be significantly higher for CAM cell 602 than for CAM cell 601. For example, because pass transistors 641A and 641B are controlled by complementary data bits D and D, respectively, one of the pass transistors 641A and 641B may undesirably turn on during the pre-charge phase. Therefore, the charging circuitry (not shown) for CL and CLB drives not only the capacitance of the comparand lines, but also the source/drain capacitance of one of the pass transistors 641, the gate capacitance seen by the node N, and any associated parasitic capacitances. These extra capacitances adversely affect the performance and the scalability of the CAM cell 602.

FIG. 6C is a block diagram of a TCAM cell 603 that incorporates an XY bit encoding technique. TCAM cell 603 is structurally similar to the quaternary CAM cell 100 of FIG. 1A, except that TCAM cell 603 has only three possible states: “0”, “1”, and “don't care,” as depicted in the truth table of FIG. 6D. More specifically, TCAM cell 603 is shown to include data cell 610, mask cell 620, and a compare circuit 650. The compare circuit 650 includes a first ML discharge path formed by pull-down transistors 651 and 652A, and includes a second ML discharge path formed by pull-down transistors 653 and 652B. The gate of transistor 651 receives a “data” bit (X) from data cell 610, and the gate of transistor 653 receives a “mask” bit (Y) from mask cell 620. The gate of transistor 652A receives the comparand bit C from the comparand line CL, and the gate of transistor 652B receives the complementary comparand bit C from the complementary comparand line CLB. Thus, the compare circuit 650 of CAM cell 603 is a 2-stack compare circuit.

FIG. 7 shows a block diagram of a TCAM cell 700 in accordance with some embodiments. TCAM cell 700 includes a data cell 710, a mask cell 720, and a compare circuit 730. Both data cell 710 and mask cell 720 can be implemented with any suitable type of storage cell including, for example, an SRAM cell, DRAM cell, Flash memory cell, STT cell, and so on. The TCAM cell 700 can store three possible states: “0”, “1”, or “don't care.” Thus, when TCAM cell 700 stores a “0” or a “1,” TCAM cell 700 operates in a manner similar to binary CAM cells. For example, during compare operations when TCAM cell 700 stores a “0” or a “1,” if the comparand bit C matches the data bit D stored in data cell 710, then compare circuit 730 does not discharge the match line ML, which remains in its pre-charged state to indicate the match condition. Conversely, if the comparand bit C does not match the data bit D, then compare circuit 730 discharges the match line ML (e.g., toward ground potential) to indicate the mismatch condition. To store a don't care state, an active mask bit is stored in mask cell 720 to prevent compare circuit 730 from discharging the match line ML, regardless of the values of D and C.

In accordance with the present embodiments, compare circuit 730 includes two NMOS match line pull-down transistors 733A and 733B, two PMOS pass transistors 731A and 731B, two NMOS gating transistors 732A and 732B, and an NMOS mask discharge transistor 735. The mask transistor 735 is controlled by the mask cell 720. A first group of transistors 731A, 732A, and 733A forms a first selective pull-down circuit 740A that selectively discharges the match line ML in response to a comparison between the comparand bit C provided on CL and the data bit D stored in the data cell 710, and a second group of transistors 731B, 732B, and 733B forms a second selective pull-down circuit 740B that selectively discharges the match line ML in response to a comparison between the complemented comparand bit C provided on CLB and the complemented data bit D.

More specifically, for the first selective pull-down circuit 740A, the NMOS match line pull-down transistor 733A is coupled between the match line ML and the discharge transistor 735, and has a gate tied to a first node (Na) that selectively receives the data bit D via PMOS pass transistor 731A in response to the comparand bit C. Thus, the gate of match line pull-down transistor 733A is selectively driven by D in response to C. The NMOS gating transistor 732A is coupled between the gate of match line pull-down transistor 733A (e.g., node Na) and ground potential. The common gates of transistors 731A and 732A are coupled to the comparand line CL, and receive the comparand bit C during compare operations.

For the second selective pull-down circuit 740B, the NMOS match line pull-down transistor 733B is coupled between the match line and the discharge transistor 735, and has a gate tied to a second node (Nb) that selectively receives D via the PMOS pass transistor 731B in response to C. Thus, the gate of match line pull-down transistor 733B is selectively driven by D in response to C. The NMOS gating transistor 732B is coupled between the gate of match line pull-down transistor 733B (e.g., node Nb) and ground potential. The common gates of transistors 731B and 732B are coupled to the complementary comparand line CLB, and receive the complemented comparand bit C during compare operations. The NMOS mask discharge transistor 735 is coupled between the common sources of transistors 733A-733B and ground potential, and has a gate coupled to one side of the mask cell 720 (e.g., to the side that provides the complement of the value of the mask bit stored in the mask cell).

If there is a mismatch condition during compare operations, and the mask cell 720 stores an inactive mask bit (e.g., M=0 and M=1) that turns on mask discharge transistor 735, then the match line ML is discharged low toward ground potential either through a first discharge path formed by transistors 733A and 735 or through a second discharge path formed by transistors 733B and 735. Thus, each discharge path in compare circuit 730 has only two series-connected transistors, as in the case of CAM cell 602 of FIG. 6B and CAM cell 603 of FIG. 6C. However, unlike CAM cells 602 and 603, the complementary data bits (D and D) and the complementary comparand bits (C and C) are provided to and processed by compare circuit 730 in a differential manner, which can improve performance over CAM cells 602 and 603 by providing balanced impedances. Therefore, in accordance with present embodiments, the TCAM cell 700 in FIG. 7 incorporates the advantages of differential compare circuitry and a shortened, two-transistor pull-down stack.

An exemplary compare operation between a comparand bit C and a data value D stored in the CAM cell 700 is now described. During a pre-charge phase of the compare operation, the match line ML is pre-charged to logic high (e.g., towards VDD) by a suitable pre-charge circuit (not shown for simplicity), and the comparand lines CL/CLB are both pre-charged to logic high (e.g., towards VDD). The logic high state of CL turns on NMOS transistor 732A and turns off PMOS transistor 731A. The conductive state of transistor 732A pulls the gate of match line pull-down transistor 733A (e.g., at node Na) low towards ground potential, thereby maintaining transistor 733A in a non-conductive state to isolate the match line ML from ground potential. The non-conductive state of transistor 731A isolates the data cell 710 from node Na, thereby preventing the value of D from being pulled low to ground potential by the conductive NMOS transistor 732A. Similarly, the logic high state of CLB turns on NMOS transistor 732B and turns off PMOS transistor 731B. The conductive state of transistor 732B pulls the gate of match line pull-down transistor 733B (e.g., at node Nb) low towards ground potential, thereby maintaining transistor 733B in a non-conductive state to isolate the match line ML from ground potential. The non-conductive state of transistor 731B isolates the data cell 710 from node Nb, thereby preventing the value of D from being pulled low towards ground potential by the conductive NMOS transistor 732B.

Then, during an evaluation phase of the compare operation, the comparand bit C is provided in a complementary manner to the TCAM cell 700 via comparand lines CL and CLB. For this example, the mask bit M is set to an inactive state (e.g., M=0 and M=1), thereby turning on mask discharge transistor 735 so that the match line pull-down transistors 733A and 733B can selectively pull the match line ML to ground potential in response to the compare operation. If a comparand line is driven to logic high, then the corresponding selective pull-down circuit 740 is disabled and does not discharge the match line ML, as described above. Conversely, if a comparand line is driven to logic low, then the corresponding selective pull-down circuit 740 is enabled and selectively discharges the match line ML in response to the corresponding data bit D and the comparand bit C. For example, if CL is driven to logic low (e.g., in response to C=0), the logic low state of CL turns off NMOS transistor 732A and turns on PMOS transistor 731A, thereby allowing the logic state of D to propagate through transistor 731A to node Na and selectively turn on match line pull-down transistor 733A, thereby selectively discharging the match line ML in response to the logic state of D. If both CL and CLB are driven to a logic high (e.g., to achieve a column-masking function), then both selective pull-down circuits 740A and 740B are disabled and together prevent the match line ML from discharging, thereby causing the CAM cell 700 to indicate a match condition on ML irrespective of the data value D.

For one example, if the comparand bit is logic high (e.g., C=1 and C=0), then CL is driven to logic high and CLB is driven to logic low. The logic high state of CL disables the first selective pull-down circuit 740A (in the manner described above), and prevents the data bit D from affecting the compare operation. The logic low state of CLB enables the second selective pull-down circuit 740B, and allows the complemented data bit D stored in the data cell 710 to selectively discharge the match line ML via match line pull-down transistor 733B. Thus, if the data bit is logic high (e.g., D=1), then the logic low value of D propagates through pass gate transistor 731B to node Nb. In response thereto, NMOS pull-down transistor 733B does not turn on, and therefore the match line ML remains in its charged state to indicate the match condition between C=1 and D=1.

Conversely, if the data bit is logic low (e.g., D=0), then the logic high value of D propagates through pass gate transistor 731B to node Nb. In response thereto, NMOS pull-down transistor 733B turns on and discharges the match line ML low toward ground potential to indicate the mismatch condition between C=1 and D=0.

The TCAM cell 700 also operates in a complementary manner for compare operations in which the comparand bit is logic low (e.g., C=0 and C=1). More specifically, the logic low state of CL enables selective pull-down circuit 740A (in the manner described above), and allows the data bit D to selectively discharge the match line ML. The logic high state of CLB disables selective pull-down circuit 740B (in the manner described above), and prevents the complemented data bit D from affecting the compare operation. Thus, if the data bit is logic low (e.g., D=0), then the logic low value of D propagates through pass transistor 731A to node Na. In response thereto, NMOS pull-down transistor 733A does not turn on, and therefore the match line ML remains in its charged state to indicate the match condition between C=0 and D=0. Conversely, if the data bit is logic high (e.g., D=1), then the logic high value of D propagates through pass transistor 731A to node Na. In response thereto, NMOS pull-down transistor 733A turns on and discharges the match line ML low toward ground potential to indicate the mismatch condition between C=0 and D=1.

In accordance with the present embodiments, the compare circuit 730 of TCAM cell 700 includes only two transistors (e.g., transistors 733 and 735) in each pull-down path between the match line and ground potential, as shown in FIG. 7. In contrast, the TCAM cell 601 of FIG. 6A includes three series-connected transistors (e.g., transistors 631, 632, and 633) in each pull-down path between the match line and ground potential. As a result, the TCAM cell 700 of present embodiments is faster than the TCAM cell 601 of FIG. 6A. More specifically, because the compare circuit 730 employs double stack pull-down elements (e.g., transistors 733 and 735) between the match line and ground potential, the TCAM cell 700 puts less pull-down resistance and less capacitive loading on the match line than the 3-stack pull-down elements (e.g., transistors 631, 632, and 633) employed in the TCAM cell 601, and therefore is faster than TCAM cell 601. Further, because each CAM cell 700 puts less capacitive loading on the match line, a CAM array such as CAM array 210 of FIG. 2 can employ more CAM cells 700 in each row without degrading performance, as compared to CAM cells 601. Further, the reduced match line capacitance resulting from fewer pull-down transistors in the compare stack of CAM cell 700 may reduce power consumption, as compared with TCAM cells 601 of FIG. 6A.

FIG. 8 is a block diagram of a TCAM cell 800 in accordance with other embodiments. TCAM cell 800 includes data cell 710, mask cell 720, and a compare circuit 830. The complementary data bits (D and D) stored in data cell 710 are applied to compare circuit 830 in a differential manner. The TCAM cell 800 can store three possible states: “0”, “1”, or “don't care.” To store a don't care state, an active mask bit (M=1) is stored in mask cell 720 to turn on mask discharge transistors 834A and 834B, which in turn pull the gates of respective match line pull-down transistors 835A and 835B low towards ground potential, thereby preventing match line pull-down transistors 835A and 835B from turning on and discharging the match line ML. Conversely, when mask cell 720 stores an inactive mask bit (M=0), mask discharge transistors 834A and 834B are turned off and allow a comparison between D and C to proceed and affect the match line ML. Thus, when TCAM cell 800 stores a “0” or a “1,” TCAM cell 800 operates in a manner similar to binary CAM cells. For example, during compare operations, if the comparand bit C matches the data bit D stored in data cell 710, then compare circuit 830 does not discharge the match line ML, which remains in its pre-charged state to indicate the match condition. Conversely, if the comparand bit C does not match the data bit D, then compare circuit 830 discharges the match line ML (e.g., toward ground potential) to indicate the mismatch condition.

In accordance with the present embodiment, the compare circuit 830 includes two NMOS match line pull-down transistors 835A and 835B, four PMOS pass transistors 831A, 832A, 831B, and 832B, and four NMOS gating transistors 833A, 834A, 833B, and 834B. A first group of transistors 831A, 832A, 833A, 834A, and 835A forms a first selective pull-down circuit 840A that selectively discharges the match line ML in response to a comparison between the comparand bit C provided on CL and the data bit (D) stored in the data cell 710, and a second group of transistors 831B, 832B, 833B, 834B, and 835B forms a second selective pull-down circuit 840B that selectively discharges the match line ML in response to a comparison between the complemented comparand bit ( C) provided on CLB and the complemented data bit ( D) stored in the data cell 710. Optionally, the mask cell 720 can be configured to disable the compare circuit 830 and prevent the match line ML from discharging. In this manner, the data value D stored in data cell 710 is masked from the compare operation, thereby forcing a match condition for the CAM cell 800, regardless of the comparand data.

More specifically, for the first selective pull-down circuit 840A, the NMOS match line pull-down transistor 835A is coupled between the match line ML and ground potential, and has a gate tied to a first node (Na) that selectively receives D from the data cell 710 via series-connected PMOS pass transistors 831A and 832A. NMOS gating transistors 833A and 834A are connected in parallel between the gate of match line pull-down transistor 835A (at node Na) and ground potential. The first pass transistor 832A and the first gating transistor 833A have gates coupled to the comparand line CL, and receive the comparand bit C during compare operations. The second pass transistor 831A and the second gating transistor 834A have gates coupled to the mask cell 720 and receive the mask bit M during compare operations. Thus, as explained in more detail below, the gate of the first match line pull-down transistor 835A is responsive to a logical combination of the data bit D, the mask bit M, and the comparand bit C.

For the second selective pull-down circuit 840B, the NMOS match line pull-down transistor 835B is coupled between the match line ML and ground potential, and has a gate tied to a second node (Nb) that selectively receives D from the data cell 710 via series-connected PMOS pass transistors 831B and 832B. NMOS gating transistors 833B and 834B are connected in parallel between the gate of match line pull-down transistor 835B (at node Nb) and ground potential. The third pass transistor 832B and the third gating transistor 833B have gates coupled to the complementary comparand line CLB, and receive the complemented comparand bit C during compare operations. The fourth pass transistor 831B and the fourth gating transistor 834B have gates coupled to the mask cell 720 and receive M during compare operations. Thus, as explained in more detail below, the gate of the second match line pull-down transistor 835B is responsive to a logical combination of the complemented data bit D, the mask bit M, and the complemented comparand bit C.

In general, when a mismatch condition occurs between the data bit D and the comparand bit C in the TCAM cell 800, the match line ML is discharged through either pull-down transistor 835A or pull-down transistor 835B. Therefore, according to present embodiments, the TCAM cell 800 of FIG. 8 incorporates both advantages of differential circuitry and a shortened, one-transistor pull-down path. Note that while CAM cell 700 in FIG. 7 has a lower overall transistor count in its compare circuit 730, CAM cell 800 in FIG. 8 has a shorter, one-transistor pull-down path in its compare circuit 830.

An exemplary compare operation between a comparand bit C and a data value D stored in the CAM cell 800 is now described. During a pre-charge phase of the compare operation, the match line ML is pre-charged to logic high (e.g., towards VDD) by a suitable pre-charge circuit (not shown for simplicity), and the comparand lines CL/CLB are both pre-charged to logic high (e.g., towards VDD), which in turn disable corresponding selective pull-down circuits 840A and 840B. The logic high state of CL turns on NMOS transistor 833A and turns off PMOS transistor 832A. The conductive state of transistor 833A pulls the gate of match line pull-down transistor 835A (e.g., at node Na) low towards ground potential, thereby maintaining transistor 835A in a non-conductive state to isolate the match line ML from ground potential. The non-conductive state of transistor 832A isolates the data cell 710 from node Na, thereby preventing the value of D from being pulled low to ground potential by the conductive NMOS transistor 833A. Similarly, the logic high state of CLB turns on NMOS transistor 833B and turns off PMOS transistor 832B. The conductive state of transistor 833B pulls the gate of match line pull-down transistor 835B (e.g., at node Nb) low towards ground potential, thereby maintaining transistor 835B in a non-conductive state to isolate the match line ML from ground potential. The non-conductive state of transistor 832B isolates the data cell 710 from node Nb, thereby preventing the value of D from being pulled low to ground potential by the conductive NMOS transistor 833B.

Then, during an evaluation phase of the compare operation, the comparand bit C is provided in a complementary manner to the TCAM cell 800 via comparand lines CL and CLB. For this example, the mask cell 720 stores an “inactive” mask bit (e.g., M=0), which turns off both mask discharge transistors 834A and 834B and turns on both pass transistors 831A and 831B. If a comparand line is driven to logic high, then the corresponding selective pull-down circuit 840 is disabled and does not discharge the match line ML. Conversely, if a comparand line is driven to logic low, then the corresponding selective pull-down circuit 840 is enabled and selectively discharges the match line ML in response to the comparison between the data bit D and the comparand bit C. If both CL and CLB are driven to a logic high (e.g., to achieve a column-masking function), then both selective pull-down circuits 840A and 840B are disabled and together prevent the match line ML from discharging, thereby causing the CAM cell 800 to indicate a match condition on ML irrespective of the data value D.

For one example, if the comparand bit is logic high (e.g., C=1 and C=0), then CL is driven to logic high and CLB is driven to logic low. The logic high state of CL disables the first selective pull-down circuit 840A (in the manner described above), and prevents the data bit D from affecting the compare operation. The logic low state of CLB enables the second selective pull-down circuit 840A, thereby allowing the complemented data bit D to selectively discharge the match line ML. More specifically, the logic low state of CLB turns on PMOS transistor 832B and turns off NMOS transistor 833B. The conductive state of transistor 832B allows D to propagate to second node Nb, and the non-conductive state of transistor 833B isolates node Nb from the ground potential. Thus, if the data bit is logic high (e.g., D=1 and D=0), then the logic low value of D propagates through pass gate transistors 831B and 832B to node Nb. In response thereto, NMOS pull-down transistor 835B does not turn on, and therefore the match line ML remains in its charged state to indicate the match condition between C=1 and D=1.

Conversely, if the data bit is logic low (e.g., D=0 and D=1), then the logic high value of D propagates through pass transistors 831B and 832B to node Nb. In response thereto, NMOS pull-down transistor 835B turns on and discharges the match line ML low toward ground potential to indicate the mismatch condition between C=1 and D=0.

The TCAM cell 800 operates in a complementary manner for compare operations in which the comparand bit is logic low (e.g., C=0 and C=1). More specifically, the logic low state of CL enables the first selective pull-down circuit 840A, thereby allowing the data bit D to selectively discharge the match line ML. The logic high state of CLB disables the second selective pull-down circuit 840B, and prevents the complemented data bit D from affecting the compare operation. Thus, if the data bit is logic low (e.g., D=0), then the logic low value of D propagates through pass transistors 831A and 832A to node Na. In response thereto, NMOS pull-down transistor 835A does not turn on, and therefore the match line ML remains in its charged state to indicate the match condition between C=0 and D=0. Conversely, if the data bit is logic high (e.g., D=1 and D=0), then the logic high value of D propagates through pass transistors 831A and 832A to node Na. In response thereto, NMOS pull-down transistor 835A turns on and discharges the match line ML low toward ground potential to indicate the mismatch condition between C=0 and D=1.

In accordance with the present embodiments, the compare circuit 830 of TCAM cell 800 includes only one transistor (e.g., transistor 835) in each pull-down path between the match line and ground potential, as shown in FIG. 8. In contrast, the TCAM cell 601 of FIG. 6A includes three series-connected transistors (e.g., transistors 631-632-633) in each pull-down path between the match line and ground potential, and the TCAM cells 602 and 603 of FIG. 6B and FIG. 6C, respectively, each include two series-connected transistors (e.g., transistors 642-643 in FIG. 6B, and transistors 651-652A or transistors 653-652B in FIG. 6C) in each pull-down path between the match line and ground potential. As a result, the TCAM cell 800 of FIG. 8 is faster than the TCAM cell 601-603. More specifically, because the compare circuit 830 employs single stack pull-down elements (e.g., transistor 835) between the match line and ground potential, the TCAM cell 800 puts less pull-down resistance and less capacitive loading on the match line than the 3-stack or 2-stack pull-down elements employed in other TCAM cells, and therefore is faster than such other TCAM cells. Further, because each CAM cell 800 puts less capacitive loading on the match line, a CAM array such as CAM array 210 of FIG. 2 can employ more CAM cells 800 in each row without degrading performance, as compared to CAM cells 601-603. Further, the reduced match line capacitance resulting from fewer pull-down transistors in the compare stack of CAM cell 800 may reduce power consumption, as compared with TCAM cells 601-603.

FIG. 9A is a block diagram of a TCAM cell 900 that incorporates an XY encoding technique in accordance with some embodiments. TCAM cell 900 includes a data cell 710, a mask cell 720, and a compare circuit 930. The data stored in the data cell 710 is applied to a compare circuit 930 in a differential manner as D and D. The mask bit stored in the mask cell 720 is also applied to the compare circuit 930 in a differential manner as M and M. The mask cell 720 can be configured, together with the data cell 710, to disable the compare circuit 930 from discharging a match line ML, leaving the match line ML always logic high. Thus, the TCAM cell 900 can be configured to store three possible states: “0”, “1”, or “don't care,” as depicted in the truth table 950 of FIG. 9B. For example, when the TCAM cell 900 stores a “0” or a “1,” the TCAM cell 900 operates as a binary CAM cell. When the mask cell 720 and the data cell 710 store the same logic value (e.g., both “0” or both “1), the TCAM cell 900 stores a “don't care” value and indicates a match condition regardless of the comparand data applied to the TCAM cell.

In accordance with the present embodiments, the compare circuit 930 includes a single match line pull-down transistor 934, two pass transistors 931A and 931B, two gating transistors 932A and 932B, and two control transistors 933A and 933B. A first group of transistors 931A, 932A, and 933A forms a first selective pull-down control circuit 940A that controls the match line pull-down transistor 934 and selectively discharges the match line ML in response to a comparison between the complemented comparand bit ( C) provided on CLB, the data bit (D) stored in the data cell 710, and the mask bit (M) stored in the mask cell 720. A second group of transistors 931B, 932B, and 933B forms a second selective pull-down control circuit 940B that controls the match line pull-down transistor 934 and selectively discharges the match line ML in response to a comparison between the comparand bit (C) provided on CL, the complemented data bit ( D) stored in the data cell 710, and the complemented mask bit ( M) stored in the data cell 720. Optionally, the mask cell 720 and the data cell 710 can together be configured to disable the compare circuit 930 and prevent the match line ML from discharging. In this manner, the data value stored in CAM cell 900 is masked from the compare operation, thereby forcing a match condition for the CAM cell 900, regardless of the comparand data.

More specifically, the NMOS match line pull-down transistor 934 is coupled between the match line ML and ground potential, and has a gate tied to a pull-down or discharge node (Np) that selectively receives control signals from match line pull-down control circuits 940A and 940B. For the first selective pull-down control circuit 940A, the PMOS control transistor 933A is coupled between the pull-down node Np and a first node (Na), and has a gate to receive the mask bit M from mask cell 720. The NMOS gating transistor 932A is coupled between ground potential and the first node Na, which in turn selectively receives D from data cell 710 via PMOS pass transistor 931A. PMOS pass transistor 931A and NMOS gating transistor 932A are connected in series, and have gates coupled to the complementary comparand line CLB. For the second selective pull-down control circuit 940B, PMOS control transistor 933B is coupled between the pull-down node Np and a second node (Nb), and has a gate to receive the complemented mask bit M from mask cell 720. The NMOS gating transistor 932B is coupled between ground potential and the second node Nb, which in turn selectively receives D from data cell 710 via PMOS pass transistor 931B. PMOS pass transistor 931B and NMOS gating transistor 932B are connected in series, and have gates coupled to the complementary comparand line CL. Thus, as explained in more detail below, the gate of the single match line pull-down transistor 934 is responsive to (1) a logical combination of the data bit D, the mask bit M, and the complemented comparand bit C, and (2) a logical combination of the complemented data bit D, the complemented mask bit M, and the comparand bit C.

When a match condition occurs, the match line ML is discharged through a single match line pull-down transistor 934. Therefore, according to the present embodiments, TCAM cell 900 of FIG. 9A incorporates both advantages of differential compare circuitry and a shortened, one-transistor pull-down path. It is further observed that the CAM cell 900 in FIG. 9A has the same, reduced overall transistor count in its compare circuit 930 as the compare circuit 730 of CAM cell 700 in FIG. 7.

For other embodiments, PMOS control transistors 933A and 933B can be NMOS transistors, in which case the gate of transistor 933A receives M and the gate of transistor 933B receives M.

An exemplary compare operation between a comparand bit C and a data value (represented by the data bit D and the mask bit M, as illustrated in FIG. 9B) stored in the CAM cell 900 is now described. During a pre-charge phase of the compare operation, the match line ML is pre-charged to logic high (e.g., towards VDD) by a suitable pre-charge circuit (not shown for simplicity), and the comparand lines CL/CLB are both pre-charged to logic high (e.g., towards VDD). The logic high state of CL turns on NMOS transistor 932B and turns off PMOS transistor 931B, thereby pulling node Nb low to ground potential. Therefore, although one of the control transistors 933A and 933B may be turned on because of the complementary mask bit M and M, in the case that 933B is turned on, the conductive state of transistor 933B pulls the gate of match line pull-down transistor 934 (e.g., at node Np) low towards ground potential, thereby maintaining transistor 934 in a non-conductive state to isolate the match line ML from ground potential. The non-conductive state of transistor 931B isolates the data cell 710 from node Nb, thereby preventing the value of D from being pulled low to ground potential by the conductive NMOS transistor 932B.

Similarly, the logic high state of CLB turns on NMOS transistor 932A and turns off PMOS transistor 931A, thereby pulling node Na low to ground potential. Therefore, although one of the control transistors 933A and 933B may be turned on because of the complementary mask bit M and M, in the case that 933A is turned on, the conductive state of transistor 933A pulls the gate of match line pull-down transistor 934 (e.g., at node Np) low towards ground potential, thereby maintaining transistor 934 in a non-conductive state to isolate the match line ML from ground potential. The non-conductive state of transistor 931A isolates the data cell 710 from node Na, thereby preventing the value of D from being pulled low to ground potential by the conductive NMOS transistor 932A.

Then, during an evaluation phase of the compare operation, the comparand bit C is provided in a complementary manner to the TCAM cell 900 via comparand lines CL and CLB. For this example, the mask cell 720 and the data cell 710 store either a logic 0 or a logic 1 value. For one example, if the comparand bit is logic high (e.g., C=1 and C=0), then CL is driven to logic high and CLB is driven to logic low. The logic high state of CL turns off pass transistor 931B and turns on gating transistor 932B of the second selective pull-down control circuit 940B, thereby preventing the complemented data bit D from affecting the compare operation. The logic low state of CLB turns off gating transistor 932A and turns on pass transistor 931A of the first selective pull-down control circuit 940A, thereby allowing the data bit D, the mask bit M, and the complemented mask bit M to selectively discharge the match line ML. Thus, if the data value is logic high (e.g., D=0 and M=1, as in rows 961 and 965 of FIG. 9B), the logic low value of M turns on control transistor 933B, which pulls the logic state of the pull-down node Np low to ground potential via gating transistor 932B. In response thereto, NMOS pull-down transistor 934 does not turn on, and therefore the match line ML remains in its charged state to indicate the match condition between C=1 and a data value of 1. The logic high state of M turns off control transistor 933A, and preserves the logic state of the data bit D.

Conversely, if the data bit is logic low (e.g., D=1 and M=0, as in rows 962 and 966 of FIG. 9B), then the logic high value of D propagates through pass transistor 931A to node Na. The logic low value of M turns on control transistor 933A, so that the logic high value of D propagates to the pull-down node Np. In response thereto, NMOS pull-down transistor 934 turns on and discharges the match line ML low toward ground potential to indicate the mismatch condition between C=1 and data value of 0. The logic high state of M turns off control transistor 933B to prevent the pull-down node Np from being pulled low to ground potential by gating transistor 932B.

The TCAM cell 900 operates in a complementary manner for compare operations in which the comparand bit is logic low (e.g., C=0 and C=1), where CL is driven to logic low and CLB is driven to logic high. More specifically, the logic high state of CLB turns off pass transistor 931A and turns on gating transistor 932A of the first selective pull-down control circuit 940A, thereby preventing the data bit D from affecting the compare operation. The logic low state of CL turns off gating transistor 932B and turns on pass transistor 931B of the second selective pull-down control circuit 940B, thereby allowing the complemented data bit D, the mask bit M, and the complemented mask bit M to selectively discharge the match line ML. Thus, if the data value is logic low (e.g., D=1 and M=0, as in rows 962 and 966 of FIG. 9B), the logic low value of M turns on control transistor 933A, and pulls the pull-down node Np low to ground potential via gating transistor 932A. In response thereto, NMOS pull-down transistor 934 does not turn on, and therefore the match line ML remains in its charged state to indicate the match condition between C=0 and the data value of 0. The logic high state of M turns off control transistor 933B, and preserves the logic state of the complemented data bit D.

Conversely, if the data value is logic high (e.g., D=0 and M=1, as in row 961 and 965 of FIG. 9B), then the logic high value of D propagates through pass gate transistor 931B to the pull-down node Nb. The logic low value of M turns on control transistor 933B, so that the logic high value of D propagates to the pull-down node Np. In response thereto, NMOS pull-down transistor 934 turns on and discharges the match line ML low toward ground potential to indicate the mismatch condition between C=0 and data value of 1. The logic high state of M turns off control transistor 933A to prevent node Np from being pulled low to ground potential by gating transistor 932A.

To indicate the “don't care” state in TCAM cell 900, mask cell 720 and data cell 710 store the same logic value. For example, when mask cell 720 and data cell 710 both store a “1,” (e.g., D=1 and D=0; M=1 and M=0), the mask bit M disables the first selective pull-down control circuit 940A by turning off control transistor 933A, and the complemented mask bit M enables the second selective pull-down control circuit 940B by turning on control transistor 933B. Therefore, if the comparand bit C is logic high, pass transistor 931B turns off and gating transistor 932B turns on, which in turn pulls the gate of the match line pull-down transistor 934 (e.g., at node Np) low to ground potential, thereby turning off pull-down transistor 934 and forcing a match condition. Conversely, if the comparand bit C is logic low, gating transistor 932B turns off and pass transistor 931B turns on, which in turn allows the logic low state of D to pull the gate of the match line pull-down transistor 934 (e.g., at node Np) low to ground potential, thereby turning off pull-down transistor 934 and forcing a match condition.

Similarly, when mask cell 720 and data cell 710 both store a “0,” (e.g., D=0 and D=1; M=0 and M=1), the mask bit M enables the first selective pull-down control circuit 940A by turning on control transistor 933A, and the complemented mask bit M disables the second selective pull-down control circuit 940B by turning off control transistor 933B. Therefore, if the complemented comparand bit C is logic high, pass transistor 931A turns off and gating transistor 932A turns on, which in turn pulls the gate of the match line pull-down transistor 934 (e.g., at node Np) low to ground potential, thereby turning off pull-down transistor 934 and forcing a match condition. Conversely, if the complemented comparand bit C is logic low, gating transistor 932A turns off and pass transistor 931A turns on, which in turn allows the logic low state of D to pull the gate of the match line pull-down transistor 934 (e.g., at node Np) low to ground potential, thereby turning off pull-down transistor 934 and forcing a match condition. In this manner, CAM cell 900 indicates a match regardless of the value of the comparand data applied when data cell 710 and mask cell 720 both store the same value.

Note that if both CL and CLB are driven to a logic high (e.g., to achieve a column-masking function), then both selective pull-down control circuits 940A and 940B are disabled and together prevent the match line ML from discharging by maintaining match line pull-down transistor 934 in a non-conductive state, thereby causing the CAM cell 900 to indicate a match condition on ML irrespective of the data value D.

In accordance with the present embodiments, the compare circuit 930 of TCAM cell 900 includes only one transistor (e.g., transistor 934) in the pull-down path between the match line and ground potential, as shown in FIG. 9A. In contrast, the TCAM cell 601 of FIG. 6A includes three series-connected transistors (e.g., transistors 631-632-633) in each pull-down path between the match line and ground potential, and the TCAM cells 602 and 603 of FIG. 6B and FIG. 6C include two series-connected transistors (e.g., transistors 642-643 in FIG. 6B, and transistors 651-652A or transistors 653-652B in FIG. 6C) in each pull-down path between the match line and ground potential. Accordingly, the TCAM cell 900 of present embodiments is faster than the TCAM cells 601-603. More specifically, because the compare circuit 930 employs single stack pull-down elements (e.g., transistor 934) between the match line and ground potential, the TCAM cell 900 puts less pull-down resistance and less capacitive loading on the match line than the 3-stack or 2-stack pull-down elements employed in the TCAM cells 601-603, and therefore is faster than TCAM cells 601-603. In addition, CAM cell 900 advantageously includes only one pull-down path between match line ML and ground potential (e.g., through transistor 934), which also reduces match line capacitance compared to CAM cells (such as CAM cells 601-603) that each include two pull-down paths between the match line and ground potential. Further, because each CAM cell 900 puts less capacitive loading on the match line, a CAM array such as CAM array 210 of FIG. 2 can employ more CAM cells 900 in each row without degrading performance, as compared to CAM cells 601-603. Further, the reduced match line capacitance resulting from fewer pull-down transistors in the compare stack of CAM cell 900 may reduce power consumption, as compared with TCAM cells 601-603.

While particular embodiments have been shown and described, it will be obvious to those skilled in the art that changes and modifications may be made without departing from this disclosure in its broader aspects and, therefore, the appended claims are to encompass within their scope all such changes and modifications as fall within the true spirit and scope of this disclosure.

Further, it should be noted that the various circuits disclosed herein may be described using computer aided design tools and expressed (or represented), as data and/or instructions embodied in various non-transitory computer-readable media, in terms of their behavioral, register transfer, logic component, transistor, layout geometries, and/or other characteristics. Formats of files and other objects in which such circuit expressions may be implemented include, but are not limited to, formats supporting behavioral languages such as C, Verilog, and VHDL, formats supporting register level description languages like RTL, and formats supporting geometry description languages such as GDSII, GDSIII, GDSIV, CIF, MEBES and any other suitable formats and languages. Non-transitory computer-readable media in which such formatted data and/or instructions may be embodied include, but are not limited to, non-volatile storage media in various forms (e.g., optical, magnetic or semiconductor storage media). 

What is claimed is:
 1. A ternary content addressable memory (CAM) cell for comparing a comparand bit with a data value having one of three possible states represented by a data bit and a mask bit, the CAM cell comprising: a data cell to store the data bit; a mask cell to store the mask bit; and a compare circuit coupled to the data cell and the mask cell, and including a discharge path between a match line and ground potential, wherein the discharge path consists essentially of a single transistor, wherein: the single transistor is a first match line pull-down transistor connected between the match line and ground potential, and having a gate responsive to a logical combination of the data bit, the mask bit, and the comparand bit; and the compare circuit further comprises a second match line pull-down transistor connected between the match line and ground potential, and having a gate responsive to a logical combination of a complemented data bit, the mask bit, and a complemented comparand bit.
 2. The CAM cell of claim 1, wherein the compare circuit further comprises: first and second pass transistors connected in series between the data cell and the gate of the first match line pull-down transistor, the first pass transistor having a gate to receive the mask hit, and the second pass transistor having a gate to receive the comparand bit.
 3. The CAM cell of claim 2, wherein the compare circuit further comprises: third and fourth pass transistors connected in series between the data cell and the gate of the second match line pull-down transistor, the third pass transistor having a gate to receive the mask bit, and the fourth pass transistor having a gate to receive the complemented comparand bit.
 4. The CAM cell of claim 3, wherein the pass transistors are PMOS transistors.
 5. The CAM cell of claim 2, wherein the compare circuit further comprises: first and second gating transistors connected in parallel between the gate of the first match line pull-down transistor and ground potential, the first gating transistor having a gate to receive the mask bit, and the second gating transistor having a gate to receive the comparand bit.
 6. The CAM cell of claim 5, wherein the compare circuit further comprises: third and fourth gating transistors connected in parallel between the gate of the second match line pull-down transistor and ground potential, the third gating transistor having a gate to receive the mask bit, and the fourth gating transistor having a gate to receive the complemented comparand bit.
 7. The CAM cell of claim 6, wherein the gating transistors are NMOS transistors.
 8. A ternary content addressable memory (CAM) cell for comparing a comparand bit with a data value having one of three possible states represented by a data bit and a mask bit, the CAM cell comprising: a data cell to store the data bit; a mask cell to store the mask bit; and a compare circuit coupled to the data cell and the mask cell, and including a discharge path between a match line and ground potential, wherein the discharge path consists essentially of a single transistor, wherein: the single transistor is a match line pull-down transistor connected between the match line and ground potential, and having a gate that is responsive to a first logical combination of the data bit, the mask bit, and a complemented comparand bit, and that is responsive to a second logical combination of a complemented data bit, a complemented mask bit, and the comparand bit.
 9. The CAM cell of claim 8, wherein the compare circuit further comprises: a first pass transistor connected between the data cell and a first node, and having a gate to receive the comparand bit; a first gating transistor connected between the first node and ground potential, and having a gate to receive the comparand bit; and a first control transistor connected between the first node and the gate of the match line pull-down transistor, and Laving a gate to receive the complemented mask bit.
 10. The CAM cell of claim 9, wherein the compare circuit further comprises: a second pass transistor connected between the data cell and a second node, and having a gate to receive the complemented comparand bit; a second gating transistor connected between the second node and ground potential, and having a gate to receive the complemented comparand bit; and a second control transistor connected between the second node and the gate of the match line pull-down transistor, and having a gate to receive the mask bit.
 11. The CAM cell of claim 10, wherein the pass transistors are PMOS transistors.
 12. The CAM cell of claim 10, wherein the control transistors are PMOS transistors.
 13. The CAM cell of claim 10, wherein the gating transistors are NMOS transistors.
 14. The CAM cell of claim 10, wherein the pass transistors and the control transistors are NMOS transistors.
 15. A ternary content addressable memory (CAM) cell for comparing a comparand bit with a data value having one of three possible states represented by a data bit and a mask bit, the CAM cell comprising: a data cell to store the data bit; a mask cell to store the mask bit; and a compare circuit coupled to the data cell, the mask cell, and a match line, the compare circuit comprising: a first match line pull-down transistor connected between the match line and ground potential, and having a gate that is responsive to a logical combination of the data bit, the mask bit, and the comparand bit; and a second match line pull-down transistor connected between the match line and ground potential, and having a gate that is responsive to a logical combination of a complemented data bit, the mask bit, and a complemented comparand bit.
 16. The CAM cell of claim 15, wherein the compare circuit further comprises: first and second pass transistors connected in series between the data cell and the gate of the first match line pull-down transistor, the first pass transistor having a gate to receive the mask bit, and the second pass transistor having a gate to receive the comparand bit.
 17. The CAM cell of claim 16, wherein the compare circuit further comprises: third and fourth pass transistors connected in series between the data cell and the gate of the second match line pull-down transistor, the third pass transistor having a gate to receive the mask bit, and the fourth pass transistor having a gate to receive the complemented comparand bit.
 18. The CAM cell of claim 17, wherein the pass transistors are PMOS transistors.
 19. The CAM cell of claim 15, wherein the compare circuit further comprises: first and second gating transistors connected in parallel between the gate of the first match line pull-down transistor and ground potential, the first gating transistor having a gate to receive the mask bit, and the second gating transistor having a gate to receive the comparand bit.
 20. The CAM cell of claim 19, wherein the compare circuit farther comprises: third and fourth gating transistors connected in parallel between the gate of the second match line pull-down transistor and ground potential, the third gating transistor having a gate to receive the mask bit, and the fourth gating transistor having a gate to receive the complemented comparand bit.
 21. The CAM cell of claim 20, wherein the gating transistors are NMOS transistors. 